Component({

  externalClasses: ['v-panel'],

  properties: {
    isShow: {
      type: Boolean,
      value: false,
      observer: function (newVal, oldVal) {
        // 属性值变化时执行
      }
    },
    buttonBorder: {
      type: String,
      value: ""
    },
    backgroundColor: {
      type: String,
      value: "#fff"
    }, 
  },
  data: {
    keyNumber: '123',
    keyEnInput1: '456',
    keyEnInput2: '789',
    keyEnInput3: '.0'
  },
  methods: {
    vehicleTap: function (event) {
      let val = event.currentTarget.dataset.value;
      // var val;
      // if (/^(\d?)+(\.\d{0,2})?$/.test(event.currentTarget.dataset.value)) { //正则验证，提现金额小数点后不能大于两位数字
      //   val = event.currentTarget.dataset.value;
      // } else {
      //   val = event.currentTarget.dataset.value.substring(0, event.currentTarget.dataset.value - 1);
      // }
      console.log(event)
      switch (val) {
        case 'delete':
          this.triggerEvent('delete');
          this.triggerEvent('inputchange');
          break;
        case 'ok':
          this.triggerEvent('ok',val);
          break;
        case 'exit':
          this.triggerEvent('exit',val);
          break;
        case '.':
            this.triggerEvent('dian', val);
            break;
        default:
          this.triggerEvent('inputchange', val);
      }
    },
    colse_da(){
      // this.triggerEvent('exit2');
    },
    check(){
      
      if (this.data.keyBoardType==1){
        this.data.keyBoardType = 2
      }else if (this.data.keyBoardType == 2) {
        this.data.keyBoardType = 1
      }
      this.setData({
        keyBoardType: this.data.keyBoardType
      })
    },
  }
});